import request from '@/utils/request'

// 查询家长-孩子关联列表
export function listChild(query) {
  return request({
    url: '/tongban/child/list',
    method: 'get',
    params: query
  })
}

// 查询孩子列表
export function listInstitutionChild(id){
  let query = {id:id}
  return request({
    url: '/tongban/child/listInstitutionChild',
    method: 'get',
    params: query
  })
}

// 查询家长-孩子关联详细
export function getChild(parentalChildId) {
  return request({
    url: '/tongban/child/' + parentalChildId,
    method: 'get'
  })
}

// 新增家长-孩子关联
export function addChild(data) {
  return request({
    url: '/tongban/child',
    method: 'post',
    data: data
  })
}

// 修改家长-孩子关联
export function updateChild(data) {
  return request({
    url: '/tongban/child',
    method: 'put',
    data: data
  })
}

// 删除家长-孩子关联
export function delChild(parentalChildId) {
  return request({
    url: '/tongban/child/' + parentalChildId,
    method: 'delete'
  })
}

// 导出家长-孩子关联
export function exportChild(query) {
  return request({
    url: '/tongban/child/export',
    method: 'get',
    params: query
  })
}
